package org.reference.generic.base;

import java.util.*;

/**
 * 
 */
public abstract class Manager extends Item {

    /**
     * 
     */
    public Manager() {
    }

    /**
     * 
     */
    protected ArrayList<Item> itemList = new ArrayList<>();

    /**
     * 
     */
    private OnCompleteListenner onCompleteListenner;

    /**
     * @param parameters
     */
    public abstract void init(Parameter parameters, List<ReferenceParameter> rpList );

    /**
     * @return
     */
    public abstract void getResult();

    /**
     * @param completeListenner
     */
    public void setOnCompleteListenner(OnCompleteListenner completeListenner) {
        this.onCompleteListenner = completeListenner;
    }

    /**
     * 
     */
    protected void onComplete() {
        // TODO implement here
    	if (onCompleteListenner == null) return;
    	onCompleteListenner.onComplete(this);
    }

    /**
     * 
     */
    public interface OnCompleteListenner {

        /**
         * 
         */
        public void onComplete(Manager manager);

    }

}